﻿namespace MqttSample
{
    /// <summary>
    /// mqtt opton
    /// </summary>
    public class MqttClientOption
    {
        /// <summary>
        /// mqtt server host
        /// </summary>
        public string Host { get; set; }

        /// <summary>
        /// mqtt server host's port
        /// </summary>
        public int Port { get; set; }

        /// <summary>
        /// mqtt server clientid
        /// </summary>
        public string ClientId { get; set; }

        /// <summary>
        /// mqtt server user
        /// </summary>
        public string User { get; set; }

        /// <summary>
        /// mqtt server password
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// mqtt client topic list
        /// </summary>
        public List<string> TopicList { get; set; } = new List<string>();

        /// <summary>
        /// 控制台是否显示接收数据
        /// </summary>
        public bool IsConsoleLog { get; set; }

        /// <summary>
        /// key
        /// </summary>
        public string Key => $"{Host}|{Port}|{ClientId}";
    }
}
